package com.zd.common.common.enums;

public enum PayStatusEnum {
	cancel_order(-1, "取消订单"),
	To_be_paid(0, "待支付"),
	Payment_success(1, "支付成功");
	
	
	private int key;
	private String value;

	private PayStatusEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}


	public void setKey(int key) {
		this.key = key;
	}


	public String getValue() {
		return value;
	}


	public void setValue(String value) {
		this.value = value;
	}


	public static PayStatusEnum get(int key) {
		for (PayStatusEnum payStatus : PayStatusEnum.values()) {
			if (payStatus.getKey() == key) {
				return payStatus;
			}
		}
		return null;
	}
}
